<div class="layui-body">
	<div class="aright">
	<div class="arz cl"><a href="{:url('man/auth/add')}"><i class="layui-icon">&#xe608;</i>添加授权配置信息写入服务器</a></div>
	<form method="post" class="aform cl" >
	
	<table width="100%">
	      <tr>
			<th width="5%" align="center"><i class="layui-icon">&#xe63f;</i> </th>
	        <th width="8%" align="center">源码服务器ip</th>
	        <th width="8%" align="center">公众号appId</th>
	        <th width="8%" align="center">消息加解密Key</th>
	        <th width="8%" align="center">消息校验Token</th>
	        <th width="10%" align="center">第三方名称</th>
	        <th width="8%" align="center">第三方appId</th>
	        <th width="8%" align="center">第三方appSecret</th>
	        <th width="8%" align="center">写入状态</th>			
	        <th width="25%" align="center">基本操作</th>
	      </tr>
	      {volist name="data" id="vo"}
		  <tr>
			<td align="center"><font color="#393D49">{$vo.id}</font></td>
	        <td align="center">{$vo.server_ip}</td>
	        <td align="center">{$vo.appid}</td>
	        <td align="center">{$vo.encodingAesKey}</td>
	        <td align="center">{$vo.token}</td>
	        <td align="center"><font color="#1E9FFF">{$vo.app_name}</font></td>
			<td align="center">{$vo.com_appid}</td>
			<td align="center">{$vo.component_appsecret}</td>
			<td align="center">
			{if condition="($vo.status == 1) "} <font color="green"><strong><i class="layui-icon">&#xe605;</i></strong></font>
				{else /} <font color="red"><strong><i class="layui-icon">&#x1006;</i></strong></font>
				{/if}
			</td>			
	        <td align="center">
	        	<a href="http://{$vo['server_ip']}/wx/wx1.php?act=preAuthCode" target="_blank" title="点击去执行授权"><strong><i class="layui-icon">&#xe609;</i></strong></a>&nbsp;
	        	<a href="{:url('auth/edit',array('id'=>$vo['id']))}" title="修改"><i class="layui-icon">&#xe642;</i></a>&nbsp;
	        	<a href="{:url('auth/delete',array('id'=>$vo['id']))}" onclick="return confirm('您确定要删除吗？');" title="删除"><font color="#FF5722"><i class="layui-icon">&#xe640;</i></font></a>
	        </td>
	      </tr>
	      {/volist}
	 </table>

	 </form>
	 		<div class="pages">
 				{$data->render()}
	 	 	</div>
	</div>
	</div>
</div>
<script>
layui.use('layer',function(){
	var layer = layui.layer;
})
function change(aid,type,status){
	$.post("{:url('man/auth/change')}",{'aid':aid,'type':type,'status':status},function(data){
		if(data){
			layer.msg("修改成功");
			setTimeout(function(){
				window.location.reload();
			},1000);
			
		}
	})
}
</script>